<template>
  <li class="list-group-item">
    <div class="handle">
      <a href="javascript:;" @click="delComments">删除</a>
    </div>
    <p class="user"><span >{{comment.user}}</span><span>说:</span></p>
    <p class="centence">{{comment.content}}</p>
  </li>

</template>

<script>
  export default {
    name: "CommentItem",
    props:['comment','delComment'],
    methods:{
      delComments() {
        if(confirm(`您确定要删除用户:'${this.comment.user}'的评论吗?`)){
          this.delComment(this.comment.id)
        }
      }
    }
  }
</script>

<style scoped>

</style>